
<input id="orgcode" type="hidden" value="10098" />
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$_W['uniaccount']['name']}</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=yes" />
<link type="text/css" rel="stylesheet" href="{OSSURL}public/mobile/css/mNewMsg.css?v=4.8" />	
<link type="text/css" rel="stylesheet" href="{OSSURL}public/mobile/css/greenStyle.css?v=4.80120" />
<script type="text/javascript" src="{OSSURL}public/mobile/js/jquery-1.11.3.min.js?v=4.8"></script>

</head>
<body>
	<div class="all">

<style>
.swiper-slide {
    text-align:center;
    background:#000;

    /* Center slide text vertically */
    display:-webkit-box;
    display:-ms-flexbox;
    display:-webkit-flex;
    display:flex;
    -webkit-box-pack:center;
    -ms-flex-pack:center;
    -webkit-justify-content:center;
    justify-content:center;
    -webkit-box-align:center;
    -ms-flex-align:center;
    -webkit-align-items:center;
    align-items:center;
}

</style>
<div class="swiper-container" style="display:none">
    <div class="swiper-wrapper">
        <div class="swiper-slide"></div>
    </div>
    <!-- Add Pagination -->
    <div class="swiper-pagination"></div>
</div>

<div id="BlackBg" class="BlackBg"></div>

<div id="titlebar" class="header mainColor">
	<div class="l"></div>
	<div class="m">
				<span>请假申请</span>
	</div>
		<div class="r">
			<a href="#my-menu"></a>
		</div>
	</div>
<div id="titlebar_bg" class="_header"></div>

		<div class="msgBox">
			<div class="campusBox">
				<span class="l">申请人：</span>
				<span class="c">{$student['s_name']}</span>
			</div>
			<div class="checkedBox">
				<span class="l">收件人：</span>
				<span class="c" id="receiver_name">&nbsp;&nbsp;{$techers[$tid]['tname']}&nbsp;老师</span>	
			</div>
			<div class="timeBox">
				<span class="l">请假类型：</span>
				<span class="c">
                     <select name="select" id="type" >
					     <option value="">选择请假类型</option>
						 <option value="病假">病假</option>
				         <option value="事假">事假</option>
				         <option value="其他">其他</option>
				     </select>				
				<!-- <input id="type" placeholder="输入类型，病假，事假，其他" type="text" value="" /> -->
				</span>
			</div>
			<div class="timeBox">
				<span class="l">请假时间：</span>
				<span class="r">
					<input class="start" type="text" placeholder="{php echo (date('Y.m.d',TIMESTAMP))}" name="test" id="startTime" value="{php echo (date('Y.m.d',TIMESTAMP))}"/>
					<input class="end" type="text" placeholder="{php echo (date('Y.m.d',TIMESTAMP+200010))}" name="test" id="endTime" value="{php echo (date('Y.m.d',TIMESTAMP+200010))}"/>
				</span>
			</div>
			<div class="textInfo">
				<textarea rows="" cols="" id="content" placeholder="请输入请假详细理由...（200字以内）"></textarea>
			</div>
			<div class="msgSubmit">
				<button class="mainColor" onclick="sendSubmitBtn();">发送</button>
			</div>
		</div>
	</div>
</body>

<script type="text/javascript" src="{OSSURL}public/mobile/js/PromptBoxUtil.js?v=4.81022"></script>
<script type="text/javascript">
var PB = new PromptBox();

function sendSubmitBtn(){
	
		if($("#type").val() == null || $("#type").val() == ""){
			PB.prompt("请假类型不能为空！");
			return;
		}else if($("#startTime").val() == null || $("#startTime").val() == ""){
			PB.prompt("请填写请假起始时间！");
			return;
		}else if($("#endTime").val() == null || $("#endTime").val() == ""){
			PB.prompt("请填写请假到校时间！");
			return;
		}else if($("#content").val() == null || $("#content").val() == ""){
			PB.prompt("请输入详细请假原由！");
			return;
		}
	
	if(confirm("确定发送本条信息？")){
		var submitData = {
			openid :"{$openid}",
			schoolid :"{$schoolid}",
			weid :"{$weid}",
			sid :"{$student['id']}",
			uid :"{$fan['uid']}",
			tid :"{$tid}",
			bj_id :"{$student['bj_id']}",
			type : $("#type").val(),
			startTime : $("#startTime").val(),
			endTime : $("#endTime").val(),  //关系
			content : $("#content").val(),
		};
	        $.post("{php echo $this->createMobileUrl('indexajax',array('op'=>'xsqingjia'))}",submitData,function(data){
            if(data.result){
                PB.prompt(data.msg);
				window.location.href = "{php echo $this->createMobileUrl('user', array('schoolid' => $schoolid), true)}"
            }else{
                PB.prompt(data.msg);
            }
        },'json'); 
    }
}
</script>
</html>